Public Class TextureBrushDemo

    
    Private Sub TextureBrushDemo_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

        Dim cx As Integer = Me.Width
        Dim cy As Integer = Me.Height
        Dim img As Image = Image.FromFile("car.jpg")
        Dim tbrush As New TextureBrush(img)

        tbrush.WrapMode = Drawing2D.WrapMode.TileFlipX

        e.Graphics.FillEllipse(tbrush, 0, 0, 2 * cx \ 3, 2 * cy \ 3)
        e.Graphics.FillEllipse(tbrush, cx \ 3, cy \ 3, 2 * cx \ 3, 2 * cy \ 3)
    End Sub

    Private Sub TextureBrushDemo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
